package com.css.zfzx.fwsjcj.modules.structure.service;

import com.alibaba.fastjson.JSONObject;
import com.css.zfzx.fwsjcj.modules.analysis.vo.AnalysisQueryVo;
import com.css.zfzx.fwsjcj.modules.structure.entity.FwOtherStructureEntity;
import com.css.zfzx.fwsjcj.modules.structure.vo.StructureQueryVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author leon
 * @Title: FwBrickStructureService
 * @Description: 砖混结构
 * @date 2020/6/3 10:08
 */
public interface FwOtherStructureService {
    /**
     * 新增子表和主表
     *
     * @param fwOtherStructureEntity
     */
    void save(FwOtherStructureEntity fwOtherStructureEntity);

    /**
     * 修改子表和主表
     *
     * @param fwOtherStructureEntity
     */
    void update(FwOtherStructureEntity fwOtherStructureEntity);

    /**
     * 分页查询
     *
     * @param structureQueryVo
     * @param curPage
     * @param pageSize
     * @return
     */
    JSONObject getPage(StructureQueryVo structureQueryVo, int curPage, int pageSize);

    void delete(String id);

    /**
     * 根据ID查询
     *
     * @param id
     * @return
     */
    FwOtherStructureEntity findById(String id);

    /**
     * 根据ID查询
     *
     * @return
     */
    List<FwOtherStructureEntity> findAll();

    /**
     * 批量提交
     *
     * @param idList
     */
    void submit(List<String> idList);

    /**
     * 导入
     */
    String exportExcel(String taskName, String taskId, MultipartFile file, HttpServletResponse response);

    /**
     * 根据表单id添加附件ID
     *
     * @param formId
     * @param fileId
     */
    void updateFileId(String formId, String fileId);

    /**
     * 统计分析砖混结构类型房屋数量
     *
     * @param analysisQueryVo
     * @return
     */
    long count(AnalysisQueryVo analysisQueryVo);

    /**
     * 统计分析砖混结构类型房屋数量
     */
    double area(AnalysisQueryVo analysisQueryVo);

    void export(List<String> idList, HttpServletResponse response);
    /*
    按照类型结构统计栋数
    */
    long buildingCount(AnalysisQueryVo analysisQueryVo);
    /*
     按照类型结构统计面积
     */
    double otherAreaCount(AnalysisQueryVo analysisQueryVo);
}
